import numpy as np
import matplotlib.pyplot as plt
import cv2
def nothing(x):
    pass
img = cv2.imread('./img/logo.jpg')
#cv2.imshow('image0',img)

cv2.namedWindow('image')
cv2.createTrackbar('ratio','image',0,255,nothing)


while(1):
    ratio = cv2.getTrackbarPos('ratio','image')
    cv2.imshow('image',img)
    key=cv2.waitKey(1)&0xFF
    if key==27:
        break
    if key == ord('s'):
        print('ratio',ratio)
cv2.destroyAllWindows()